package com.fernfx.xingtan;

import com.fernfx.xingtan.common.base.BaseApplication;
import com.fernfx.xingtan.main.ui.MainActivity;
import com.fernfx.xingtan.user.ui.LoginActivity;
import com.fernfx.xingtan.utils.LogUtils;
import com.fernfx.xingtan.utils.OtherUtil;

import java.util.Hashtable;
import java.util.Map;

/**
 * Created by admin on 2018/7/30.
 */

public class ConsumerApplication extends BaseApplication{
    //需要按两次退出的activity
    public static final Map<String,Boolean> TOUCH_EXIT_MAP = initTouchExitMap();

    @Override
    public void initData() {
        //设置接口环境
        BaseApplication.initEnvironment(Environment.test);
        //set log
        LogUtils.isDebug = BaseApplication.IS_DEBUG;
    }

    private static final Map<String,Boolean> initTouchExitMap(){
        final Map<String,Boolean> map = new Hashtable<>(10);
        map.put(OtherUtil.getClassSimpleName(LoginActivity.class),true);
        map.put(OtherUtil.getClassSimpleName(MainActivity.class),true);
        return map;
    }
}
